<template>
  <div class="child">
    <h1>{{ infoStore.count }} ---{{ infoStore.total }}</h1>
    <button @click="updateCount">点击我修改仓库数据</button>
  </div>
</template>

<script setup lang="ts">
import useInfoStore from "../../stores/modules/info";
// 获取小仓库对象
let infoStore = useInfoStore();
// 修改数据方法
const updateCount = () => {
  infoStore.updateNum(66,77)
};
</script>
<style scoped lang="less">
.child {
  width: 200px;
  height: 200px;
  background: yellowgreen;
}
</style>